import React,{ Component,Fragment } from 'react';
import userMC from '../static/css/user.module.css';
class GroupBlock extends Component{
  render(){
    let group = [];
    if(this.props.group && this.props.group.length > 0){
      let groupList = this.props.group;
      for(let i in groupList){
        let one = <li key={i}>
                    <img src={require("../static/images/user.png")} />
                    <span>{groupList[i]}</span>
                  </li>
        group.push(one);
      }
    }
    return(
      <Fragment>
        <p>--当前在线--</p>
        <ul className={userMC.userList}>
          {group}
        </ul>
      </Fragment>
    )
  }
}

export default GroupBlock;